.logo.vanilla:hover {
  filter: drop-shadow(0 0 2em #ffe21c);
}
:root {
  font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;

  color: #0f0f0f;
  background-color: #f6f6f6;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;

  --primary-color: #4a90e2;
  --secondary-color: #f5f5f5;
  --text-color: #333;
  --border-color: #ddd;
  --hover-color: #e6f2ff;
  --completed-color: #888;
  --importance-s: #ff6b6b;
  --importance-a: #ffa07a;
  --importance-b: #ffd700;
  --importance-c: #98fb98;
  --importance-d: #87ceeb;
  --importance-e: #dda0dd;
  --importance-f: #d3d3d3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

.app-container {
  display: flex;
  height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
  width: 250px;
  background-color: #2c3e50;
  border-right: 1px solid #1a252f;
  padding: 20px;
  color: #ecf0f1;
}

.sidebar-header h1 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #3498db;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  padding: 10px 15px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  color: #ecf0f1;
}

.nav-item:hover {
  background-color: #34495e;
}

.nav-item.active {
  background-color: #3498db;
  color: white;
}

/* 主内容区样式 */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.view-title {
  font-size: 1.5rem;
}

.view-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* 月视图样式 */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 15px;
  margin-top: 20px;
}

.calendar-day {
  border: 1px solid var(--border-color);
  padding: 15px;
  min-height: 150px;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
}

.calendar-day:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.calendar-day.today {
  background-color: #f0f8ff;
  border: 2px solid var(--primary-color);
}

.calendar-day-header {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1.1rem;
  color: #555;
  text-align: center;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
}

.calendar-day-todos {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  padding-right: 5px;
}

.calendar-todo {
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 6px;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: all 0.2s;
  white-space: normal;
  word-break: break-word;
}

.calendar-todo:hover {
  background-color: #e9ecef;
}

.calendar-todo.completed {
  text-decoration: line-through;
  color: var(--completed-color);
  background-color: #f1f1f1;
}

.calendar-day-header:nth-child(1),
.calendar-day-header:nth-child(7) {
  color: #e74c3c;
}

/* 周视图样式 */
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.week-day {
  border: 1px solid var(--border-color);
  padding: 10px;
  min-height: 200px;
}

.week-day-header {
  font-weight: bold;
  margin-bottom: 10px;
}

/* 日视图样式 */
.day-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.day-view .view-header {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.day-view .view-title {
  font-size: 1.8rem;
  font-weight: 300;
  color: #333;
}

.day-view .view-controls {
  font-size: 1rem;
}

/* 日视图表格样式 */
.todo-section-title {
  font-size: 1.2rem;
  margin: 20px 0 10px;
  color: #555;
  font-weight: 500;
}

.todo-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
}

.todo-table-header {
  display: flex;
  background-color: #f5f5f5;
  padding: 10px 0;
  border-bottom: 2px solid #ddd;
  font-weight: 500;
}

.todo-table-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.todo-table-row:hover {
  background-color: #f9f9f9;
}

.todo-table-row.completed {
  color: var(--completed-color);
}

.todo-col-checkbox {
  width: 40px;
  padding: 0 10px;
  text-align: center;
}

.todo-col-title {
  flex: 3;
  padding: 0 10px;
}

.todo-col-urgency,
.todo-col-importance {
  width: 80px;
  padding: 0 10px;
  text-align: center;
}

.todo-col-start,
.todo-col-due {
  width: 120px;
  padding: 0 10px;
}

.todo-col-actions {
  width: 60px;
  padding: 0 10px;
  text-align: center;
}

.sortable {
  cursor: pointer;
  position: relative;
}

.sortable:hover {
  background-color: #e9e9e9;
}

.sortable::after {
  content: "↕";
  margin-left: 5px;
  font-size: 0.8em;
  opacity: 0.5;
}

.todo-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.todo-edit-btn:hover {
  opacity: 1;
}

/* 新增行样式 */
.todo-table-row.add-new {
  padding: 15px 0;
  border-bottom: 1px dashed #ccc;
}

.todo-table-row.add-new input {
  width: 100%;
  padding: 8px;
  border: none;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
}

.todo-table-row.add-new input:focus {
  outline: none;
  border-bottom-color: var(--primary-color);
}

/* 重要性颜色 */
.importance-s { background-color: rgba(255, 107, 107, 0.1); }
.importance-a { background-color: rgba(255, 160, 122, 0.1); }
.importance-b { background-color: rgba(255, 215, 0, 0.1); }
.importance-c { background-color: rgba(152, 251, 152, 0.1); }
.importance-d { background-color: rgba(135, 206, 235, 0.1); }
.importance-e { background-color: rgba(221, 160, 221, 0.1); }
.importance-f { background-color: rgba(211, 211, 211, 0.1); }

/* 紧急程度颜色 */
.urgency-s { background-color: rgba(255, 107, 107, 0.2); }
.urgency-a { background-color: rgba(255, 160, 122, 0.2); }
.urgency-b { background-color: rgba(255, 215, 0, 0.2); }
.urgency-c { background-color: rgba(152, 251, 152, 0.2); }
.urgency-d { background-color: rgba(135, 206, 235, 0.2); }
.urgency-e { background-color: rgba(221, 160, 221, 0.2); }
.urgency-f { background-color: rgba(211, 211, 211, 0.2); }

.todo-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.todo-item.completed {
  background-color: var(--secondary-color);
}

.todo-checkbox {
  margin-right: 10px;
}

.todo-content {
  flex: 1;
}

.todo-title {
  font-weight: 500;
}

.todo-meta {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--completed-color);
  margin-top: 5px;
}

.todo-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tag {
  background-color: var(--secondary-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.8rem;
}

.highlight {
  animation: highlight 2s ease;
}

@keyframes highlight {
  0% { background-color: rgba(255, 255, 0, 0.3); }
  100% { background-color: transparent; }
}

/* 项目视图样式 */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 15px;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-title {
  font-size: 1.2rem;
  font-weight: 500;
}

.project-todos {
  margin-top: 10px;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 4px;
  width: 500px;
  max-width: 90%;
}

.modal h3 {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* 重要性颜色 */
.importance-s { color: var(--importance-s); }
.importance-a { color: var(--importance-a); }
.importance-b { color: var(--importance-b); }
.importance-c { color: var(--importance-c); }
.importance-d { color: var(--importance-d); }
.importance-e { color: var(--importance-e); }
.importance-f { color: var(--importance-f); }

/* 按钮样式 */
button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #357abd;
}

button:disabled {
  background-color: var(--border-color);
  cursor: not-allowed;
}

#cancel-todo,
#cancel-project {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

#cancel-todo:hover,
#cancel-project:hover {
  background-color: #e0e0e0;
}

/* 下划线编辑样式 */
.edit-input {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 5px 0;
  width: 100%;
  min-width: 200px;
  font-size: 1.1rem;
  background: transparent;
  outline: none;
  transition: all 0.2s;
  resize: none;
  overflow: hidden;
  height: auto;
}

.edit-input:focus {
  min-width: 100%;
}

.edit-input:focus {
  border-bottom-color: var(--primary-color);
}

.todo-item.add-new {
  border-bottom: 1px dashed #ccc;
  padding: 12px 0;
  margin-top: 15px;
}

.todo-item.add-new:hover {
  background: #fafafa;
}

.edit-input::placeholder {
  color: #aaa;
  font-style: italic;
}
